import random
def float_random(average, begin, end):
    # print "wzh_random"
    numarr = [0 for x in range(2)]
    i = 0
    while 1:
        num = random.uniform(begin, end)
        # 取两位小数
        num_first = round(num, 2)
        # 第二个数
        num_second = average * 2 - num_first
        if begin <= num_second <= end:
            numarr[i] = round(num_first, 2)
            i = i + 1
            numarr[i] = round(num_second, 2)
            break
    return numarr
